package com.testdb.Dao;

import com.testdb.Model.Money;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface MoneyDao {
    @Select("select * from money")
    List<Money> findAll();

    @Insert("insert into money values(null,#{getorgive},#{money},#{time},#{balance})")
    void saveStudent(Money mon);
//    @Delete("delete from student where id=#{id}")
//    void deleteStudent(int id);
//    @Update("update student set name=#{name},sex=#{sex},age=#{age},major=#{major},time=#{time}where id=#{id}")
//    void updateStudent(Money student);
    @Select("select balance from money order by id desc limit 1")
    public Double findone();
}
